ExecuteCallBack
When your clock component determines that it is time to execute a callback function, your component should call theExecuteCallBack
function.
pascal void ExecuteCallBack (QTCallBack cb);
cb
- Specifies the callback event for the operation. Your clock component obtains this value from the parameters passed to your
ClockCallMeWhen
function (described on page 11-10).DESCRIPTION
This function handles all the details of invoking the callback function properly. For example, theExecuteCallBack
function queues the callback function correctly, according to the function's ability to execute at interrupt time (specified in thecallBackType
parameter to yourClockNewCallBack
function, described on page 11-9).Before calling the application's function, the
ExecuteCallBack
function cancels the callback event. In this manner, the callback event is prevented from executing twice in succession. It is up to the application, or the callback function itself, to reschedule the callback event.SPECIAL CONSIDERATIONS
This function sets the A5 register to the value it contained at the time the callback event was scheduled when calling the callback function.Your clock component should not release the memory associated with the callback event at this time. You should do so only in your
ClockDisposeCallBack
function (described on page 11-13). This is particularly important when a callback function cannot execute at interrupt time, since the Movie Toolbox schedules such functions for invocation at a later time.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help